package model

import (
	"time"
)

// User 用户表
type Activitys struct {
	Id      int       `json:"id" form:"id"`
	Cid     int       `json:"cid" form:"cid"`
	Title   string    `json:"title" form:"title"`
	Content string    `json:"content" form:"content"`
	Date    time.Time `json:"date" form:"date"`
}

func ActivitysAll(cid string) ([]Activitys, error) {
	mods := make([]Activitys, 0, 4)
	err := DB.Select(&mods, "select * from activity where cid=?", cid)
	return mods, err
}
